home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 January: Mac OS SDK / Dev.CD Jan 96 SDK / Dev.CD Jan 96 SDK1.toast / Development Kits (Disc 1) / QuickDraw™ GX / Programming Stuff / Sample Code / Printing Samples / Printer Drivers… / CustomWriterGX / CustomWriterGX.make < prev    next >
Encoding:
Text File  |  1995-10-17  |  5.4 KB  |  175 lines  |  [TEXT/MPS ]

  1. #
  2. #    FILENAME
  3. #        CustomWriter GX.make
  4. #
  5. #    DESCRIPTION
  6. #        Makefile for the CustomWriter GX driver.
  7. #
  8. #    COPYRIGHT
  9. #        Copyright © 1995 Apple Computer, Inc.
  10. #        All rights reserved.
  11. #    
  12. #    Modification history
  13. #        10/04/95 - David Hayward -    Version 1.0.4 modified code so that
  14. #                                    the driver can be build under MPW,
  15. #                                    Metrowerks, and Symantec.  In general,
  16. #                                    all that was required to do this was 
  17. #                                    to add an inline-assembly jumptable
  18. #                                    and to store all globals off of the
  19. #                                    message manager instance context.
  20. #                                    Also made a few changes so that the
  21. #                                    driver can be rebuilt to support any
  22. #                                    resolution by changing the #defines
  23. #                                    kResolution and kPatStretch in
  24. #                                    "CommonDefines.h"
  25. #
  26. #        06/14/95 - Dave Hersey -    Version 1.0.3 to fix a bug in
  27. #                                    CustomBufferingAndIO.c when creating
  28. #                                    high-res PICTs, and to make the size
  29. #                                    of buffers more flexible.
  30. #
  31. #        05/26/95 - Dave Hersey -    Version 1.0.2 to add the new 'outp'
  32. #                                    desktop printer resource in NewApp.c.
  33. #
  34. #        05/03/95 - Dave Hersey -    Version 1.0.1 to fix some minor bugs in
  35. #                                    CustomBufferingAndIO.c.
  36. #
  37. #        01/14/95 - Dave Hersey -    Created from the shell of a hollowed-out
  38. #                                    ImageWriter driver.
  39. #
  40.  
  41. #========== Directories Containing Source and Object Files ==========
  42.  
  43. ObjDir                    = :Objects:
  44. SrcDir                    = 
  45. DestDir                    = 
  46. GXLibs                    = {MPW}GXLibraries
  47. GXCompatIntf            = {MPW}GXCompatibilityInterfaces
  48.  
  49. #========== Compiler Options ==========
  50.  
  51. AsmOptions                = -sym off -i "{CIncludes}" -i "{GXLibs}" -i "{GXCompatIntf}" -case obj
  52. COptions                = -sym off -i "{CIncludes}" -i "{GXLibs}" -i "{GXCompatIntf}" -mbg full -b2
  53. RezOptions                = -i "{RIncludes}" -d SystemSevenOrLater=1
  54. LinkOptions                = -ra =resSysHeap,resPurgeable
  55.  
  56.  
  57. DriverName                 = "CustomWriterGX"
  58. DriverCreator             = 'cuWR'
  59. NewSegID                = 0
  60. OldSegID                = 1
  61.  
  62.  
  63. ### Compile and assemble statements ###
  64.  
  65. {ObjDir}OldApp.c.o ƒ {SrcDir}OldApp.c
  66.     Echo "{DriverName}: Compiling old application"
  67.     C {COptions} {SrcDir}OldApp.c -o {Targ}
  68.  
  69. {ObjDir}OldApp.a.o    ƒ     {SrcDir}OldApp.a
  70.     Echo "{DriverName}: Assembling old app jump table"
  71.     Asm {AsmOptions} {SrcDir}OldApp.a -o {Targ}
  72.  
  73. {ObjDir}NewApp.c.o    ƒ {SrcDir}NewApp.c {SrcDir}NewApp.h {SrcDir}CommonDefines.h
  74.     Echo "{DriverName}: Compiling new application"
  75.     C {COptions} {SrcDir}NewApp.c -o {Targ}
  76.  
  77. {ObjDir}NewApp.a.o    ƒ     {SrcDir}NewApp.a
  78.     Echo "{DriverName}: Assembling new app jump table"
  79.     Asm {AsmOptions} {SrcDir}NewApp.a -o {Targ}
  80.  
  81. {ObjDir}ChooserLDEF.c.o    ƒ {SrcDir}ChooserLDEF.c {SrcDir}ChooserLDEF.h
  82.     Echo "{DriverName}: Compiling Chooser LDEF"
  83.     C {COptions} {SrcDir}ChooserLDEF.c -o {Targ}
  84.  
  85. {ObjDir}ChooserPACK.c.o    ƒ {SrcDir}ChooserPACK.c
  86.     Echo "{DriverName}: Compiling Chooser PACK"
  87.     C {COptions} {SrcDir}ChooserPACK.c -o {Targ}
  88.  
  89. {ObjDir}ChooserPACK.a.o    ƒ     {SrcDir}ChooserPACK.a
  90.     Echo "{DriverName}: Assembling Chooser PACK"
  91.     Asm {AsmOptions} {SrcDir}ChooserPACK.a -o {Targ}
  92.  
  93. {ObjDir}GlobalData.c.o    ƒ {SrcDir}GlobalData.c {SrcDir}GlobalData.h
  94.     Echo "{DriverName}: Compiling global data support"
  95.     C {COptions} {SrcDir}GlobalData.c -o {Targ}
  96.  
  97.  
  98. ### Rez statements ###
  99.  
  100. {DestDir}{DriverName} ƒƒ {SrcDir}OldApp.r {SrcDir}CommonDefines.h
  101.     Echo "{DriverName}: Rezzing old application"
  102.     Rez {RezOptions} -append {SrcDir}OldApp.r -o {Targ}
  103.         
  104. {DestDir}{DriverName} ƒƒ {SrcDir}NewApp.r {SrcDir}CommonDefines.h
  105.     Echo "{DriverName}: Rezzing new application"
  106.     Rez {RezOptions} -append {SrcDir}NewApp.r -o {Targ}
  107.  
  108. {DestDir}{DriverName} ƒƒ {SrcDir}ChooserPACK.r
  109.     Echo "{DriverName}: Rezzing Chooser PACK resources"
  110.     Rez {RezOptions} -append {SrcDir}ChooserPACK.r -o {Targ}
  111.  
  112. {DestDir}{DriverName} ƒƒ {SrcDir}ChooserLDEF.r {SrcDir}ChooserLDEF.h
  113.     Echo "{DriverName}: Rezzing Chooser LDEF resources"
  114.     Rez {RezOptions} -append {SrcDir}ChooserLDEF.r -o {Targ}
  115.  
  116.  
  117. ### Link statements ###
  118.  
  119. {DestDir}{DriverName} ƒƒ  {ObjDir}NewApp.a.o {ObjDir}NewApp.c.o {ObjDir}GlobalData.c.o
  120.     Echo "{DriverName}: linking new API"
  121.     Link                                        ∂
  122.         {ObjDir}NewApp.a.o                        ∂
  123.         {ObjDir}NewApp.c.o                        ∂
  124.         {ObjDir}GlobalData.c.o                    ∂
  125.         {Libraries}Interface.o                    ∂
  126.         {Libraries}RunTime.o                    ∂
  127.         {LinkOptions}                            ∂
  128.         -rt 'pdvr'={NewSegID}                    ∂
  129.         -sg NewAppOverrides                        ∂
  130.         -m SD_JumpTable                            ∂
  131.         -o {Targ}
  132.  
  133. {DestDir}{DriverName} ƒƒ {ObjDir}OldApp.a.o {ObjDir}OldApp.c.o
  134.     Echo "{DriverName}: linking old API"
  135.     Link                                        ∂
  136.         {ObjDir}OldApp.a.o                        ∂
  137.         {ObjDir}OldApp.c.o                        ∂
  138.         {LinkOptions}                            ∂
  139.         -rt 'pdvr'={OldSegID}                    ∂
  140.         -sg OldAppOverrides                        ∂
  141.         -m SD_JumpTable                            ∂
  142.         -o {Targ}
  143.  
  144. {DestDir}{DriverName} ƒƒ {ObjDir}ChooserPACK.a.o {ObjDir}ChooserPACK.c.o
  145.     Echo "{DriverName}: Linking PACK"
  146.     Link                                        ∂
  147.         {ObjDir}ChooserPACK.a.o                    ∂
  148.         {ObjDir}ChooserPACK.c.o                    ∂
  149.         -rt PACK=-4096                            ∂
  150.         -sg ChooserPACK                            ∂
  151.         -m PACKENTRY                            ∂
  152.         -o {Targ}
  153.  
  154. {DestDir}{DriverName} ƒƒ {ObjDir}ChooserLDEF.c.o
  155.     Echo "{DriverName}: Linking LDEF"
  156.     Link                                        ∂
  157.         {ObjDir}ChooserLDEF.c.o                    ∂
  158.         -rt LDEF=-4096                            ∂
  159.         -sg ChooserLDEF                            ∂
  160.         -m MAIN                                    ∂
  161.         -o {Targ} 
  162.  
  163.  
  164. ### Set Attributes ###
  165.  
  166. {DestDir}{DriverName} ƒƒ                                                        ∂
  167.     {ObjDir}ChooserLDEF.c.o  {SrcDir}ChooserLDEF.r                                ∂
  168.     {ObjDir}ChooserPACK.a.o  {ObjDir}ChooserPACK.c.o  {SrcDir}ChooserPACK.r        ∂
  169.     {ObjDir}OldApp.a.o       {ObjDir}OldApp.c.o       {SrcDir}OldApp.r            ∂
  170.     {ObjDir}NewApp.a.o       {ObjDir}NewApp.c.o       {SrcDir}NewApp.r            ∂
  171.     {SrcDir}CommonDefines.h                                                        ∂
  172.     {ObjDir}GlobalData.c.o
  173.     Echo "{DriverName}: Setting type/creator  {NewerDeps}"
  174.     SetFile -a Bi -t 'pdvr' -c {DriverCreator} {Targ}
  175.